﻿<%@ Page Title="Quản lý bài viết" Language="C#" MasterPageFile="~/Administrator/Admin.Master"
    AutoEventWireup="true" CodeBehind="BaiViet.aspx.cs" Inherits="VNSoft.Administrator.BaiViet" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        fieldset
        {
            -webkit-border-radius: 5px;
            margin-top: 5px;
            width: 1150px;
        }
        legend
        {
            font-weight: bold;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="tieude">
        Quản lý tin tức</div>
    <div style="margin: 10px 0px 5px 5px; max-height: 555px; overflow-y: scroll;">
        <asp:GridView ID="gvBaiViet" Width="100%" runat="server" BackColor="White" BorderColor="#CCCCCC"
            AutoGenerateColumns="false" BorderStyle="None" BorderWidth="1px" CellPadding="3"
            EnableModelValidation="True" OnRowCommand="gvBaiViet_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="Xóa">
                    <ItemTemplate>
                        <asp:ImageButton ID="lbXoa" runat="server" Width="20px" Height="20px" ImageUrl="~/Administrator/images/delete-24.png"
                            OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')" CommandArgument='<%#Eval("ArticleID")%>'
                            Text="Xóa" CommandName="Del" />
                    </ItemTemplate>
                    <ItemStyle Width="10px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tiêu đề">
                    <ItemTemplate>
                        <asp:LinkButton Text='<%#Eval("Title") %>' CommandArgument='<%#Eval("ArticleID")%>'
                            CommandName="Select" ID="linkSelect" runat="server"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="rows" />
                </asp:TemplateField>
                <asp:BoundField DataField="DanhMuc" HeaderText="Danh mục" HeaderStyle-Width="90px"
                    ItemStyle-HorizontalAlign="Left" />
                <asp:BoundField DataField="Date" HeaderText="Ngày đăng" HeaderStyle-Width="110px"
                    ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" />
                <asp:BoundField DataField="Active" HeaderText="Trạng thái" HeaderStyle-Width="90px"
                    ItemStyle-HorizontalAlign="Center" />
            </Columns>
            <FooterStyle BackColor="White" ForeColor="#000066" />
            <HeaderStyle BackColor="#636363" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
            <RowStyle ForeColor="#000066" BackColor="White" />
            <SelectedRowStyle BackColor="Lavender" Font-Bold="false" />
        </asp:GridView>
        <asp:HiddenField ID="hdMaBaiViet" runat="server" />
        <asp:HiddenField ID="hdMaHinhAnh" runat="server" />
        <fieldset style="padding: 5px 3px 5px 5px;">
            <legend style="color: #1E1D1D;">Thông tin bài viết</legend>
            <table width="99%" style="color: #1E1D1D; font-family: Times New Roman">
                <tr>
                    <td>
                        Tiêu đề bài viết<br />
                        <asp:TextBox ID="txtTieuDe" runat="server" Width="99%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Tóm tắt nội dung<br />
                        <asp:TextBox ID="txtTomTat" Style="line-height: 25px; max-height: 108px; max-width: 98%;
                            padding: 5px;" TextMode="MultiLine" runat="server" Width="98%" Height="71px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Từ khóa SEO<br />
                        <asp:TextBox ID="txtTuKhoaSEO" placeholder="Nhập cách nhau dấu phẩy" runat="server" Width="99%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    Danh mục bài viết <asp:DropDownList ID="dlLoaiBaiViet" runat="server" Width="300px">
                    <asp:ListItem Text="Phần mềm" Value="1"></asp:ListItem>
                    <asp:ListItem Text="Website" Value="3"></asp:ListItem>
                    <asp:ListItem Text="Dịch vụ" Value="2"></asp:ListItem>
                    <asp:ListItem Text="Đồ án" Value="4"></asp:ListItem>
                    </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        Nội dung bài viết<br />
                        <FCKeditorV2:FCKeditor ID="fcknd" Width="99%" Height="400px" SkinPath="skins/office2003/"
                            ToolbarSet="Default" runat="server" BasePath="~/fckeditor/">
                        </FCKeditorV2:FCKeditor>
                    </td>
                </tr>
                <tr>
                    <td>
                        Hình ảnh<br />
                        <asp:FileUpload ID="fu" runat="server" Width="427px" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:CheckBox ID="ckHienthi" Checked="true" runat="server" Text="Hiển thị lên website" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnAddBaiViet" CssClass="button3" runat="server" Text="Thêm mới"
                            Width="100px" Height="25px" OnClick="btnAddBaiViet_Click" />&nbsp;
                        <asp:Button ID="btnUpdateBaiViet" CssClass="button3" runat="server" Text="Cập nhật"
                            Width="100px" Height="25px" OnClick="btnUpdateBaiViet_Click" />&nbsp;
                        <asp:Button ID="btnCancelBaiViet" CssClass="button3" runat="server" Text="Hủy bỏ"
                            Width="100px" Height="25px" OnClick="btnCancelBaiViet_Click" />
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>
</asp:Content>
